<?php

class Footermenu_View_Helper_FootermenuCategories extends Zend_View_Helper_Abstract {
	public function footermenuCategories($cid) {
		// Get table info
		$table = $table = Engine_Api::_ ()->getDbtable ( 'categories', 'footermenu' );
		$categoriesTableName = $table->info ( 'name' );
		$select = $table->select ()->from ( $categoriesTableName )->where ( "{$categoriesTableName}.cid = ?", $cid );
		$rawData = $table->fetchAll ( $select );
		return count ( $rawData );
	}
}